package Exception;

/**
 * @author 王艺锡
 * @version 1.0
 */
public class Exercise03 {
    public static void main(String[] args) {
        Express skExpress = new SkExpress(0);

    }
}
abstract class Express{
    private int weight;

    public Express(int weight) {
        if (weight <= 0){
            throw new RuntimeException("重量需要大于0");
        }
        this.weight = weight;
    }

    public int getWeight() {
        return weight;
    }
}
class SkExpress extends Express{
    public SkExpress(int weight) {
        super(weight);
    }
}
